<?php

namespace app\common\model;

use think\Model;

class Admin extends Model{
    // 模型对应的表
    protected $table="pre_admin";

    public function getStateTextAttr($value,$data){
        $state=[0=>'禁用',1=>'正常'];
        return $state[$data['state']];
    }
}